/*
 *  Copyright (C) 2011 JiangHongTiao <jjurco.sk_gmail.com>
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package sk.lieskove301.jianghongtiao.liaad.prisoner.statistics;

import java.util.ArrayList;
import java.util.List;
import sk.lieskove301.jianghongtiao.liaad.prisoner.gene.GeneticInfo;
import sk.lieskove301.jianghongtiao.liaad.prisoner.memory.ForgettingEnum;

/**
 * Date of create: May 15, 2011
 *
 * @author JiangHongTiao <jjurco.sk_gmail.com>
 * @version 2011.0515
 */
public class AgentsTimelineUnit {

    //common for all agents
    private int time;
    private int count = 0;
    private String geneticInfo;
    private double maxScore = 0;
    private double totalScore = 0;
    private int bornYear = 0;
    private ForgettingEnum memory;
    private boolean inverted;
    private boolean optimistic;

    //all agents or one agent history
    private List<Double> score = new ArrayList<Double>();

    public boolean isInverted() {
        return inverted;
    }

    public void setInverted(boolean inverted) {
        this.inverted = inverted;
    }

    public ForgettingEnum getMemory() {
        return memory;
    }

    public void setMemory(ForgettingEnum memory) {
        this.memory = memory;
    }

    public boolean isOptimistic() {
        return optimistic;
    }

    public void setOptimistic(boolean optimistic) {
        this.optimistic = optimistic;
    }

    public void addScore(double score){
        this.score.add(score);
        if(maxScore < score){
            maxScore = score;
        }
        totalScore += score;
    }

    public void incCount(){
        count++;
    }

    public double getMaxScore() {
        return maxScore;
    }

    public List<Double> getScore() {
        return score;
    }

    public double getTotalScore() {
        return totalScore;
    }

    public double getMeanScore(){
        return totalScore / score.size();
    }

    public String getGeneticInfo() {
        return geneticInfo;
    }

    public void setGeneticInfo(String geneticInfo) {
        this.geneticInfo = geneticInfo;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getCount() {
        return count;
    }

    public void setBornYear(int bornYear) {
        this.bornYear = bornYear;
    }

    
//
//    public void addDecision(int decision){
//        decisions.add(decision);
//    }
//
//    public List<Integer> getDecisions() {
//        return decisions;
//    }
//
//    public List<Double> getDecisionsScore() {
//        return decisionsScore;
//    }
//
//    public void addDecisionsScore(Double decisionsScore) {
//        this.decisionsScore.add(decisionsScore);
//    }

    public int getBornYear() {
        return bornYear;
    }

}
